-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify evaluation of absorption coefficients #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the cleanup! Yes let's discuss the larger picture changes together at some later date.
@@ -55,7 +55,7 @@ class TophatEmissivity { | |||
Real AbsorptionCoefficient(const Real rho, const Real temp, const Real Ye, | |||
const RadiationType type, const Real nu, | |||
Real *lambda = nullptr) const { | |||
return dist_.AbsorptionCoefficientFromKirkhoff(*this, rho, temp, Ye, type, | |||
return dist_.AbsorptionCoefficientFromKirchhoff(*this, rho, temp, Ye, type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops thank you for the spelling fix...
@@ -49,8 +49,7 @@ class GrayOpacity { | |||
PORTABLE_INLINE_FUNCTION | |||
Real AbsorptionCoefficient(const Real rho, const Real temp, const Real nu, | |||
Real *lambda = nullptr) const { | |||
return dist_.AbsorptionCoefficientFromKirkhoff(*this, rho, temp, nu, | |||
lambda); | |||
return rho * kappa_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I agree with this choice
I think it's maybe worth editing those down the line but no need to change it here. 👍 |
This PR originally started much larger---actually changing all calls from
AbsorptionCoefficient
toSpecificAbsorptionOpacity
. After some retrospection, a simple change of mindset got me on board with instead dealing with absorption coefficients. I'd like to discuss this via meeting.After this realization, this PR shrunk to only changing out some calls to
AbsorptionCoefficient
to directly returning rho * kappa (where rho is the material density and kappa is the material specific absorption opacity), instead of arriving there via Kirchhoff's laws.I kept the functions for
*FromKirchhoff
in this PR for photons, even though they are not used, as I think they do help guide readers of the code as to what things correspond to. Neutrinos also have calls to*FromKirchhoff
(e.g., for the tophat absorption coefficient), but I did not edit these (was this the right move?).